package com.atguigu.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0.0
 * Created by cyd on 2022-01-03 14:52:21
 * @ClassName : com.atguigu.springcloud.controller.ConfigInfoController
 * @Description : 类描述
 */
@RestController
@RequestMapping("/configInfo")
@Slf4j
@RefreshScope
public class ConfigInfoController {

    @Value("${config.info}")
    String configInfo;

    @GetMapping("/getConfigInfo")
    public String getConfigInfo(){
        return configInfo;
    }
}
